{% extends 'admin/layout.html.twig' %}

{% set menu = 'admin_queue_failed_logs' %}

{% block main %}

  {% if jobs %}
    <table class="table table-striped table-hover">
      <thead>
      <tr>
        <th>{{'ID'|trans}}</th>
        <th>{{'admin.queue.name'|trans}}</th>
        <th>{{'admin.queue.type'|trans}}</th>
        <th width="20%">{{'admin.queue.failed_reason_label'|trans}}</th>
        <th>{{'admin.queue.failed_time_label'|trans}}</th>
      </tr>
      </thead>
      <tbody>
      {% for log in jobs %}
        <tr id="job-log-table-tr-{{ log.id }}">
          <td>
            {{ log.id }}
          </td>

          <td>
            {{ log.queue }}
          </td>

          <td>
            {{ log.class }}
          </td>

          <td>
            {{ log.reason }}
          </td>

          <td>
            {{ log.failed_time|date('Y-m-d H:i:s') }}
          </td>

        </tr>
      {% endfor %}
      </tbody>

    </table>
  {% else %}
    <div class="empty">{{'admin.crontab_job.empty_hint'|trans}}</div>
  {% endif %}
  {{ admin_macro.paginator(paginator) }}

{% endblock %}